package org.manager.authorize;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class UserAccount implements Serializable{
	
	private static final long serialVersionUID = 6598209372500402981L;
	
	private String id;
	private String loginName;
	private String loginPasswd;
	private String userName;
	private String mobilePhone;
	private String phone;
	private String email;
	private String fax;
	private String status;
	private String manager;
	private String groupId;
	private String groupCode;
	
	private CreatedInformation createInfo;
	private UserGroup userGroup;
	
	private Set<SystemRole> roleSet = new HashSet<SystemRole>();

	public UserAccount() {
	}
	
	@Override
	public int hashCode() {
		int result = 3;
		result = 31*result+id.hashCode();
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(!(obj instanceof UserAccount)){
			return false;
		}
		if(((UserAccount)obj).getId().equals(id)){
			return true;
		}
		return false;
	}
	
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getLoginPasswd() {
		return loginPasswd;
	}

	public void setLoginPasswd(String loginPasswd) {
		this.loginPasswd = loginPasswd;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getMobilePhone() {
		return mobilePhone;
	}

	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public UserGroup getUserGroup() {
		return userGroup;
	}

	public void setUserGroup(UserGroup userGroup) {
		this.userGroup = userGroup;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getManager() {
		return manager;
	}

	public void setManager(String manager) {
		this.manager = manager;
	}

	public CreatedInformation getCreateInfo() {
		return createInfo;
	}

	public void setCreateInfo(CreatedInformation createInfo) {
		this.createInfo = createInfo;
	}

	public void setRoleSet(Set<SystemRole> roleSet) {
		this.roleSet = roleSet;
	}

	public Set<SystemRole> getRoleSet() {
		return roleSet;
	}
	
	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}
	
	public String getGroupId() {
		return groupId;
	}
	
	public void setGroupCode(String groupCode) {
		this.groupCode = groupCode;
	}
	
	public String getGroupCode() {
		return groupCode;
	}

}
